{% extends 'TopxiaWebBundle:Settings:layout.html.twig' %}
{% block title %}{{'绑定手机'|trans}} - {{'安全设置'|trans}} - {{ parent() }}{% endblock %}
{% set script_controller = 'settings/bind-mobile' %}
{% set side_nav = 'security' %}

{% block main %}
 {% embed "TopxiaWebBundle:Bootstrap:panel.html.twig" with {class:'panel-col'} %}
    {% block heading %}{{'绑定手机'|trans}}{% endblock %}
    {% block body %}

    	<ul class="breadcrumb">
	      <li><a href="{{ path('settings_security') }}">{{'安全设置'|trans}}</a></li>
	      <li class="active">{{'手机号码绑定'|trans}}</li>
	    </ul>

	    {{ web_macro.flash_messages() }}

	    <form id="bind-mobile-form" class="form-horizontal" method="post">

	    	{% if verifiedMobile | length > 0 %}
		    	<div class="form-group row">
		    		<div  class="col-md-3 control-label"><label>{{'已绑定手机号'|trans}}</label></div>
		    		<div class="col-md-4 controls">
		    			<div class="control-text">{{blur_phone_number(verifiedMobile)}}</div>
		    		</div>
		    	</div>
		    {% endif %}

	    	<div class="form-group row">
	        <div  class="col-md-3 control-label"><label for="password">{{'您的登录密码'|trans}}</label></div>
	        <div class="col-md-4 controls">
	        	<input type="password" id="password" name="password" class="form-control" value=""  data-url="{{ path('settings_check_login_password') }}">
	        </div>
	    	</div>

		    <div class="form-group row">
	        <div  class="col-md-3 control-label"><label for="mobile">{{'手机号码'|trans}}</label></div>
	        <div class="col-md-4 controls">
	        	<input type="text" id="mobile" name="mobile" data-url="{{path('register_email_or_mobile_check')}}" class="form-control" data-role="mobile" value="">
	        </div>
	    	</div>

	    	<div class="form-group row">
	        <div  class="col-md-3 control-label"><label for="sms_code">{{'短信验证码'|trans}}</label></div>

	        <div class="col-md-2 controls">
	        	<input type="text" id="sms-code" name="sms_code" class="form-control" value="" data-url="{{path('edu_cloud_sms_check',{type:'sms_bind'})}}">
	        </div>

        	<div class="col-md-4 controls">
		      	<a href="#modal" data-toggle="modal" class="btn btn-default btn-sm js-sms-send disabled" data-url="{{ path('register_captcha_modal') }}" data-sms-url="{{ path('edu_cloud_sms_send') }}">
		            <span id="js-time-left"></span>
		            <span id="js-fetch-btn-text">{{'获取短信验证码'|trans}}</span>
		         </a>
	        </div>

	    	</div>

	    	<div class="form-group row">
        	<div class="col-md-4 col-md-offset-3  controls">
            <button id="submit-btn" data-submiting-text="{{'正在提交'|trans}}" type="submit" class="btn btn-primary">{{'提交'|trans}}</button>
        	</div>
	      </div>

        <input type="hidden" name="_csrf_token" value="{{ csrf_token('site') }}">
	    </form>


    {% endblock %}
  {% endembed %}
{% endblock %}